<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>验证码</title>
    <script type="text/javascript" src="Scripts/jquery-min.js"></script>
    <script type="text/javascript" src="Scripts/checkCode.js"></script>
    <script>
       $(function() {
            var container = document.getElementById("vCode");
            var code = new vCode(container, {
                len: 4,
                lines: 4,
                bgColor: "#fff",
                colors: ["#000","#000","#000","#000",],
                fontSizeMin:28,
                fontSizeMax:28,
                boxHeight:32,
            });
            document.getElementById("btn").addEventListener("click", function () {
                alert(code.verify(document.getElementById("code").value));
            }, false);
        });
    </script>
</head>
<body>
<div style="margin-top: 50px;">
    <input type="text" id="code" style="height:28px;width:100px"/>
    <div id="vCode"></div>
    <button id="btn">验证</button>
</div>
</body>
</html>